<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>数组中元素最多子集</title>
	<script type="text/javascript">
        function maxLength (arr) {
        	var key = 0;
        	var maxLength=0;
            if(arr[0] instanceof Array){
                maxLength=arr[0].length;
            }
        	for(var i=1 ; i<arr.length ;i++){
                if(maxLength<arr[i].length){
                	 maxLength=arr[i].length;
                     key = i+1;
                }
        	}
        	return "数组中的第"+key+"个子集元素最多";
        }
         arr=[ 
               1,
               2,
	          [1,2,3,4,5,58,98],
	          [1,2,3,4,5,58,98,222],
	          [1,2,3,4,5],
	          [1,2,3,4,5,58],
	          [1,2,3,4,5,58,1213,1356,4646],
	          55
	        ]
        alert(maxLength(arr));
	</script>
</head>
<body>
	  
</body>
</html>